package com.atguigu.spi;

import java.util.ServiceLoader;

/**
 * @program: spi
 * @description: 测试SPI机制
 * @author: RuYuLin
 * @create: 2022-04-30 10:03
 **/
public class TestSPI {
    public static void main(String[] args) {
        ServiceLoader<InternetService> internetServices = ServiceLoader.load(InternetService.class);
        for (InternetService internetService : internetServices) {
            internetService.connectionInternet();
        }
    }
}
